﻿namespace Cuce.ReportingServices.Testing.Sample.nUnit
{
    using SSRSWS;
    using NUnit.Framework;

    /// <summary>
    /// This is a sample of a how to create nUnit Integrated Tests
    /// </summary>
    [TestFixture]
    public class IntegratedTests
    {


        public IntegratedTests()
        {
           t = new IntergratedTestWrapper(new ReportingService())
                   {
                       ReportServer = "http://test/ReportServer",
                       Credentials = new System.Net.NetworkCredential("username", "password", "domain"),
                       WebProxy = new System.Net.WebProxy()
                   };
        }

        private readonly IntergratedTestWrapper t;
        


        [Test]
        public void Directory_Sample()
        {
            var name = new ReportName("Sample Test", "/Directory/"); 
             Assert.IsTrue(t.TestReport(name) == ReportResult.PASS);
           
        }

        [Test]
        public void Directory_MasterTest()
        {

            var name = new ReportName("Master Test", "/Directory/"); 
            Assert.IsTrue(t.TestReport(name) == ReportResult.PASS);
           
        }

        [Test]
        public void Directory_Report1()
        {
            var name = new ReportName("Report1", "/Directory/"); 
            Assert.IsTrue(t.TestReport(name) == ReportResult.PASS);

        }

        [Test]
        public void Directory_Report2()
        {

            var name = new ReportName("Report2", "/Directory/"); 
            Assert.IsTrue(t.TestReport(name) ==ReportResult.PASS);

        }
    }
}
